package com.mg.common.exception;


public enum MGExceptionEnum {
    UNKNOWN_ERROR(222333,"未知错误"),
    PRODUCE_ALTER(55555,"商品信息被修改"),
    GENERATE_ORDER_DETAIL_FAIL(40000,"订单详情生成失败"),
    GENERATE_ORDER_FAIL(40000,"订单生成失败"),
    PRODUCT_INFO_ERROR(40001,"商品信息错误"),
    STOCK__NOT_ENOUGH(40004,"商品库存不足"),
    PRODUCE_INVALID(40004,"商品不存在或已被删除"),
    COUPON_VALID(40010,"优惠券已失效"),
    PARSE_ERROR(50001,"类型转换失败"),
    FOUND_ORDER_BUT_NOT_DETAILS(50002,"产生无订单详情的订单表")
    ;
    private Integer code;
    private String msg;

    MGExceptionEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
